Skip to content

Release: develop → main#77

Open
lgahdl wants to merge 123 commits into
mainfrom
develop
Open

Release: develop → main#77
lgahdl wants to merge 123 commits into
mainfrom
develop

Conversation

@lgahdl

@lgahdl lgahdl commented May 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Promotes the current develop state to main. Includes:

  • COW-978: Modularize ponder config with per-chain src/chains/ files — all 12 CoW Protocol chains defined with verified ComposableCow, CowShedFactory, AaveV3AdapterFactory, GPv2Settlement, and FlashLoanRouter addresses
  • COW-985: Add GET /api/sync-progress endpoint with per-chain completion tracking
  • COW-987: Fix stale doc references and remove duplicated content

Test plan

  • Verify indexer is healthy on server (docker ps shows cow-programmatic-ponder-1 healthy)
  • Smoke-test /api/sync-progress and /graphql endpoints
  • Review chain config addresses for correctness before enabling additional chains

🤖 Generated with Claude Code

lgahdl and others added 30 commits May 28, 2026 10:20
The by_uids endpoint returns [{order: {...}}] but the code was treating
it as a flat OrderbookOrder[]. This caused order.uid to be undefined,
so fetchOrderStatusByUids returned an empty map for all candidates,
preventing C2 from ever promoting candidateDiscreteOrders to discreteOrders.
…ves (COW-977)

Replace manage.sh, deploy-remotely.sh, and static/start-db.sh with tsx scripts
and inline compose config. Adds deploy:up/down/remote pnpm scripts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… (COW-978)

Extract per-chain addresses into src/chains/{mainnet,gnosis,arbitrum}.ts with
a central ACTIVE_CHAINS index. ponder.config.ts now derives all config with no
hardcoded addresses. Toggling a chain requires one line in src/chains/index.ts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Verify the { order } unwrap fix with a real HTTP server: 6 tests covering
correct uid→status mapping, executed amounts, multiple orders, HTTP errors,
and empty responses. Adds ponder/ponder:schema vitest stubs to resolve
virtual module imports without a running Ponder process.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Use SupportedChainId from @cowprotocol/cow-sdk for chainId typing in ChainConfig
- Derive contractPollerInterval from blockTime via pollerInterval() helper (~20s target)
- Add arbitrum, base, and sepolia chain config files (cowShedFactory/gpv2Settlement
  marked null until addresses are confirmed)
- Export ALL_DEFINED_CHAINS for ORDERBOOK_API_URLS; ACTIVE_CHAINS stays mainnet+gnosis
- Make cowShedFactory nullable in ChainConfig; filter in ponder.config.ts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…eteorder-fulfilled-not-promoted-to

fix: unwrap order wrapper from POST /orders/by_uids response (COW-979)
Clarify that manage.ts and deploy-remotely.ts are tailored to Bleu's
internal deployment workflow, as requested in PR review.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…pts-in-deployment-with-typescriptnode-or

feat: replace deployment shell scripts with TS/Node alternatives (COW-977)
Returns per-chain historical sync progress as clean JSON:
totalBlocks, processedBlocks, progressPct (0-100), isRealtime,
isComplete. Reads from Ponder's Prometheus /metrics endpoint using
the request origin so it works on any port. Registered in OpenAPI/Swagger.

6 integration tests covering: status code, chain entries, processedBlocks
calculation, progressPct rounding, realtime/complete flags, and graceful
degradation when /metrics is unreachable.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…W-985)

Add non-null assertions for Record<string, T> index access under noUncheckedIndexedAccess.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… (COW-976) (#68)

Moves deployment/docker-compose.yml to the root docker-compose.yml,
unifying dev and prod postgres into a single service. Production containers
run under the "deploy" profile. Updates manage.ts and deployment docs
accordingly. Default postgres credentials are env-var-substituted dev
fallbacks, not real secrets.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
deploy-remotely.sh was deleted by COW-977. Add Node/pnpm setup steps
and switch the run command to npx tsx deployment/deploy-remotely.ts.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Builds and pushes the image to ghcr.io on every push to main.
Tags: full git SHA (for Kubernetes to pin), branch name, and latest.
Uses GitHub Actions layer cache to speed up repeat builds.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…84) (#73)

Add "Is it working?" section explaining what to check during and after
backfill, how to distinguish stuck from slow, and what each health
endpoint signals. Addresses client feedback that the README should be
fool-proof for operators with no Ponder background.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: derive active chain descriptions from CHAIN_NAMES in data.ts (COW-982)

Add CHAIN_NAMES map to src/data.ts as single source of truth for chain
labels. ChainIdQuery description now derives from it dynamically. Update
docs/api-reference.md and docs/architecture.md to remove hardcoded
chain references and point to src/data.ts instead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* test: verify CHAIN_NAMES drives ChainIdQuery description (COW-982)

4 tests: CHAIN_NAMES has expected entries, all names are non-empty,
ChainIdQuery.description contains every id+name pair from CHAIN_NAMES,
and the description is not the old hardcoded string.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor: derive CHAIN_NAMES from cow-sdk, drop chain-names test (COW-982)

Addresses reviewer feedback: import chain labels from getChainInfo() instead
of hardcoding, and remove the low-value chain-names unit test.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
#72)

* docs: document /ready /status /metrics endpoints and k8s probes (COW-983)

Add /ready, /status, and /metrics to the endpoints table with full
descriptions. Document Kubernetes liveness/readiness probe config.
Explain /status response shape and what "stuck" looks like vs normal
backfill. Addresses client feedback about underdocumented health endpoints.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* test: add unit tests for GET /healthz endpoint (COW-983)

3 tests: verifies 200 status, {"status":"ok"} body, and JSON content-type.
Matches the behaviour documented in docs/api-reference.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor: remove redundant healthz test and probe doc sections (COW-983)

Addresses reviewer feedback: endpoint descriptions in the table are
sufficient; the dedicated sub-sections and the healthz unit test are overhead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…W-978)

Every chain in cow-sdk's ALL_SUPPORTED_CHAIN_IDS now has a config file in
src/chains/. New stubs (BNB, Polygon, Lens, Plasma, Avalanche, Ink, Linea)
follow the same pattern as existing stubs — composableCow address is the
known CREATE2 deployment; all other addresses are null with TODOs pointing
to the relevant block explorer. None are active until addresses are confirmed
(tracked in COW-986).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add entry in REST endpoints section and a dedicated subsection with
example response and field descriptions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…der-config-per-chain-files-under-srcchains' into luizhatem/cow-986-support-all-cow-protocol-chain-ids-bnb-ink-linea-etc
Fix deploy-remotely.sh/.ts, manage.sh/.ts, remove deleted static/start-db.sh,
remove duplicate API Endpoints section, update chain config references from
src/data.ts to src/chains/index.ts, and update Adding a New Chain steps.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…(COW-986)

Add verified ComposableCoW deployment blocks where confirmed on-chain via
cowprotocol/composable-cow networks.json cross-referenced with block explorers
and public RPC nodes. Also verify orderbook API URLs against cow-sdk
ORDER_BOOK_PROD_CONFIG source.

Verified startBlocks:
- Arbitrum (42161):  204751436 (networks.json + arbiscan)
- Base (8453):        21794150 (basescan, 2024-10-31)
- Sepolia (11155111):  5072748 (networks.json + sepolia.etherscan.io, 2024-01-12)
- BNB (56):           48433175 (networks.json + bscscan.com, 2025-04-17)
- Polygon (137):      70406888 (polygonscan.com, 2025-04-17)
- Lens (232):          3516559 (networks.json + rpc.lens.xyz, 2025-09)
- Plasma (9745):       4810535 (networks.json + rpc.plasma.to)
- Avalanche (43114):  60434336 (snowscan.xyz, 2025-04-17)
- Ink (57073):        34878187 (Blockscout API + rpc-gel.inkonchain.com)
- Linea (59144):      25028474 (networks.json + lineascan.build)

Verified orderbook API URLs (all return HTTP 200 from api.cow.fi):
- bnb, polygon, plasma, avalanche, ink, linea — confirmed active
- lens — NOT yet in cow-sdk ORDER_BOOK_PROD_CONFIG; api.cow.fi/lens returns 404

Also restore CHAIN_NAMES export in src/data.ts (removed during merge conflict
resolution) — derived from ACTIVE_CHAINS.name instead of the old getChainInfo().

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rbookApiUrl to orderbookApiPath (COW-978)

- Remove contractPollerInterval field from ChainConfig; compute inline in ponder.config.ts via pollerInterval()
- Rename orderbookApiUrl -> orderbookApiPath storing only the path suffix (e.g. "mainnet", "xdai")
- Update src/data.ts to construct full URL from path: https://api.cow.fi/${c.orderbookApiPath}
- Update all 12 chain files accordingly

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…978)

Replace placeholder startBlocks (0 / rough estimates) with values verified
from cowprotocol/composable-cow networks.json and block explorers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…b-ink-linea-etc' into luizhatem/cow-978-modularize-ponder-config-per-chain-files-under-srcchains

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…2Settlement for 5 chains (COW-978)

All addresses confirmed on-chain via ROUTER() call. Deployment blocks verified
by binary search on each chain's RPC.

Chains: arbitrum, base, avalanche, linea, polygon

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…2Settlement for BNB and Plasma (COW-978)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat: modularize ponder config with per-chain src/chains/ (COW-978)
feat: add GET /api/sync-progress endpoint (COW-985)
docs: fix stale references and remove duplicated content (COW-987)
…d on RPC provisioning

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
lgahdl and others added 30 commits June 4, 2026 21:00
…ostgreSQL section

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The new name is precise: it measures eth_getLogs block-fetch progress
(ponder_historical_completed_blocks + cached / total), not handler execution.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Combines develop's ordersByOwnerHandler integration tests (mocked db.select)
with HEAD's GeneratorSummary and OrdersByOwnerResponse schema regression guards.
The "returns enriched orders" test gains an explicit gen["hash"] assertion.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: minor cleanups from grant review (COW-996, COW-999, COW-1003)
…W-993)

feat: expose generator hash in REST /api/orders/by-owner response (COW-993)
Both sides added adjacent lines after the orderUid import: HEAD added the
DiscreteStatus derived type, develop added the OrderType import. Keep both.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…onfirmer (COW-990)

fix: preflight /by_uids before cascade-cancelled insert in CandidateConfirmer (COW-990)
…W-994)

Extends the log() migration from blockHandler.ts and settlement.ts to all
remaining call sites in composableCow.ts, setup.ts, orderbookClient.ts, and
uidPrecompute.ts. No console.log/warn/error remain in src/application/ outside
logger.ts itself. Documents the scope and usage convention in deployment.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ath and order_uid_cache (COW-1000)

- Update all C1-C5 / ContractPoller / StatusUpdater / HistoricalBootstrap /
  DeterministicCancellationSweeper references to the new semantic names
  (OrderDiscoveryPoller, OrderStatusTracker, OwnerBackfill, CancellationWatcher)
- Clarify in overview and data-flow diagram that block handlers are generic
  (apply to all generators regardless of type); Aave flash loan detection is
  event-driven via settlement.ts, not a block handler
- Add cow_cache.order_uid_cache section explaining why it's retained across
  Ponder deployments and what is/isn't cached

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…Handler.ts

architecture.md: keep new handler names (HEAD) + add develop's preflight /by_uids
sentence to the CandidateConfirmer cancellation limitation note.
blockHandler.ts: use new semantic name prefix + include preflightKnown field.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…-994)

Keep only path and port — the operator decides periodSeconds, failureThreshold,
and initialDelaySeconds based on their cluster SLOs. Add a note explaining this.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…001)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… (COW-1000)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… Known Limitations

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…-gaps-and-architecture-accuracy

docs: fix ops gaps and architecture.md accuracy (COW-1001 + COW-1002)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ing with semantic handler names

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…der.config.ts

ponder.config.ts renamed the five block handlers to semantic names but
blockHandler.ts still had the old ponder.on("ContractPoller:block", ...)
registrations — causing Ponder to fail at startup or silently skip the
mismatched handlers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…at's Not Implemented sections; drop COW-908 task ref from constant comment (COW-1000)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
refactor: rename block handlers to semantic namespaced names (COW-1000)
…ale sweep (COW-989)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…uplicate ORDERBOOK_HTTP_TIMEOUT_MS import (COW-989)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: account fallback for TWAP parts aged out of /by_uids (COW-989)
…r import, handler renames (COW-991)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…entResolver (COW-991)

fix: wrap settlement.ts RPC calls in withTimeout, remove decode dead code (COW-991)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant